<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page pageEncoding="UTF-8" %>
<%@ include file="../common/common.jsp"%>
<%@ page import="jp.co.technotree.apl.api.common.Message" %>
<%@ page import="jp.co.technotree.apl.cmd.graph.Grp3000Bean;" %>
<jsp:useBean id="formBean" class="jp.co.technotree.apl.cmd.graph.Grp3000Bean" scope="request" />

<html>
	<head>
		<title>予備品管理システム - 在庫グラフ作成画面</title>
		<link rel="SHORTCUT ICON" href="../common/img/default/sys_icon.ico">

		<link rel='stylesheet' type='text/css' href='../../common/css/common/base.css' >
		<link rel='stylesheet' type='text/css' href='../../common/css/common/common.css'>
		<link rel='stylesheet' type='text/css' href='../../common/css/graph/grp3000.css'>

		<script language="javascript" src="../../common/js/base.js"></script>
		<script language="javascript" src="../../common/js/menu/topmenu.js"></script>

		<!--ポップアップ用-->
		<link rel='stylesheet' type='text/css' href='../../common/css/popUpPc.css' >
		<script type='text/javascript' src='../../common/js/popUpPc.js'></script>
		
		<!-- システムログ -->
		<script src="../../common/js/systemlog.js"></script>

			<style type='text/css'>
				.LinkItem {
					cursor: pointer;
				}
				.txtmode1 {
 					 ime-mode: active;   /* 全角モード */
				}
				.txtmode2 {
  					ime-mode: inactive; /* 半角モード */
				}
				.txtmode3 {
  					ime-mode: disabled; /* 半角のみモード */
				}
			</style>

<script language="javascript">
function onInit(){
	//topBackChange(0);
	//httpRequest();
	
	//完了後、メッセーを出してメイン画面に遷移
	var stateFlg = "<%=formBean.getStateFlg()%>";
	
	var afterFunc="nextPageJump('topmenu1000');"
	if(stateFlg == "1"){
		//在庫履歴情報を正常に登録しました。
		alert_Info2("<%=Message.getMessage("INF00020").replace("$1", "在庫履歴情報")%>",afterFunc);
	}
	
	<%
	//--------------------------------
	//ダウンロード画面-START
	String popupFilePath = formBean.getExcelPath();
	if (popupFilePath != null && !"".equals(popupFilePath)) {
	%>
	var fn="<%=popupFilePath%>";
	var ft="10";
	var downTitleFlg="2";
	var excelTitleFlg="2";

	//1:受注, 2:出荷指示, 3:DNC納品書, 4:DNC納品書バーコード付き, 5:未納, 6:受領, 7:受領比較, 8:内示, 9:内示受注比較 ...他
		var features="location=no, menubar=no, status=no, scrollbars=no, resizable=yes, toolbar=no, width=510, height=400";
		window.open("../download/download?fn=" + fn + "&ft=" + ft + "&downTitleFlg=" + downTitleFlg + "&excelTitleFlg=" + excelTitleFlg, "_blank", features);
		
	<%
	}
	//ダウンロード画面-END
	//--------------------------------
	%>
}
function historyBtn(){
	var afterFunc="yesHistoryBtn();"
	if (!confirm_Custom3("<%=Message.getMessage("INF01150")%>",afterFunc)){
		return ;
	}
	
}
function yesHistoryBtn(){
	mainForm = document.getElementById("F1");
	document.getElementById("historyExe").value = "1";
	mainForm.submit();
}
function grpBtn(){
	if(document.getElementById("findHistoryDt").value!=""){
		var afterFunc="yesGrpBtn();"
		if (!confirm_Custom3("<%=Message.getMessage("INF01160").replace("$1", "在庫グラフ")%>",afterFunc)){
			return ;
		}
	}else{
		alert_Custom("<%=Message.getMessage("WRN00010").replace("$1","対象年度")%>");
	}
	
}
function yesGrpBtn(){
	mainForm = document.getElementById("F1");
	document.getElementById("grpExe").value = "1";
	mainForm.submit();
}
function nextPageJump(nextPage){
	mainForm = document.getElementById("F1");
	document.getElementById("nextPage").value = nextPage;
	mainForm.submit();
}
//数字しか入力できないように
function numberKeyPress(){
	//備考：少数点とかマイナスを入力させるには48ではなく45かな？
	if ((event.keyCode < 48) || (event.keyCode > 57)){event.returnValue = false;};
}

//-------------------------------------------------------------------------
//<!-- ポップアップ START -->

//パップアップ解除
function back(){
	document.getElementById("opAlertBtn").style.display = "none";
	document.getElementById("opAlert").style.display = "none";
	document.getElementById("opAlertButton").style.display = "none";
	document.getElementById("opAlertTop").style.display = "none";
	document.getElementById("allbackgr").style.display = "none";
}

//<!-- ポップアップ END -->
//-------------------------------------------------------------------------

</script>

	</head>

	<body onLoad="onInit()" style="margin: 0px 4px 0px 0px;">
		<form class="frmMain" name="main" id="F1" action="./grp3000" method="post" enctype="multipart/form-data" onsubmit="return false;">
			<table class="tblMain" width="100%" cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td valign="top">
						<table class='main-width-tb'  cellspacing='0' cellpadding='0' border='0'><tr><td></td></tr></table>
						<table class='main-height-tb' cellspacing='0' cellpadding='0' border='0'><tr><td></td></tr></table>

						<!-- Header Menu START -->
						<div class="header-title">予備品管理システム(<%=formBean.kojou%>)</div>
						<!-- Header Menu END -->

						<!-- ***** [FORM] MAIN-FORM ***** -->
						<div id="lc-out" style="z-index: 0;">
							<div id="lc-in" style="z-index: 0">

								<div  class="txtcenter" style="margin: 20px ; width: 98%;">
									<div class="subtitle">在庫グラフ作成画面</div>
									<table  border="0" style="width: 50%;">
										<tr>
											<td>
												<table border="0" width=98%>
													<!-- スペース -->
													<tr height="50px"><td></td></tr>
													<tr>
														<td>
															対象年度
															<input type="text" class="inputStyle txtmode3" name="findHistoryDt" id="findHistoryDt" style="width:200px;" value="<%=formBean.getFindHistoryDt()%>" onKeyPress="numberKeyPress();" maxlength="4">
														</td>
													</tr>
													
													<!-- スペース -->
													<tr height="50px"><td></td></tr>

													<tr>
														<td class= "txtCenter">
															<input type="image" src="../../common/img/pc/btn_history_write_off.png" onclick="historyBtn()" alt="履歴書込">
														</td>
														<td class="txtright">
															<input type="image" src="../../common/img/pc/btn_excel_out_off.png" onclick="grpBtn()" alt="EXCEL出力">
															&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
															<input type="image" src="../../common/img/pc/btn_back_off.png" onclick="nextPageJump('topmenu1000')">
														</td>
													</tr>
													
													<!-- スペース -->
													<tr height="300px"><td></td></tr>
													
												</table>
											</td>
										</tr>
									</table>
								</div>
							</div><!-- lc-in End -->


							<!-- ログ Start -->
							<!-- ログ End -->

						</div><!-- lc-out  -->
					</td>
				</tr>
			</table>

			<input type="hidden" name="cmd" value="cmd01">
			<input type="hidden" name="submitFlag" value="0">
			<input type="hidden" id="nextPage" name="nextPage" value="">
			<input type="hidden" id="historyExe" name="historyExe" value="">
			<input type="hidden" id="grpExe" name="grpExe" value="">
			
			
			<!--警告 ポップアップ---------------------------------------------------------------------------- -->
			<div id="allbackgr" class="allbackgr" style="display:none;"></div>
			<div class="opAlertBtn" id = "opAlertBtn" style="display:none;" ></div>
			<div class="opAlertButton" id = "opAlertButton" style="display:none;" ></div>
			<div class="opAlertTop" id = "opAlertTop" style="display:none; font-size:22px;">　予備品管理システム　</div>
			<div class="opAlert" id = "opAlert" style="display:none;"></div>
			<!-- -------------------------------------------------------------------------------------------- -->
		</form>
	</body>
</html>
